<?php
function logIt($parm,$value){
$root = $_SERVER['DOCUMENT_ROOT'].'/loc/log/';
$fh = fopen($root.date("Ymd")."log.html",'a');
$stringData = getIp().'++'.date("F j, Y, g:i a").'++parm:'.$parm.' value:'.$value.'<br/>';
fwrite($fh, $stringData);
fclose($fh);
}
function getIp(){
if(getenv('HTTP_CLIENT_IP'))return getenv('HTTP_CLIENT_IP');
if(getenv('HTTP_X_FORWARDED_FOR'))return getenv('HTTP_X_FORWARDED_FOR');
if(getenv('HTTP_X_FORWARDED'))return getenv('HTTP_X_FORWARDED');
if(getenv('HTTP_FORWARDED_FOR'))return getenv('HTTP_FORWARDED_FOR');
if(getenv('HTTP_FORWARDED'))return getenv('HTTP_FORWARDED');
return $_SERVER['REMOTE_ADDR'];
}
?>